package com.ucarbon.ucarbon.service.impl;

import com.ucarbon.ucarbon.entity.Country;
import com.ucarbon.ucarbon.mapper.CountryMapper;
import com.ucarbon.ucarbon.service.ICountryService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 雄安新区县相关表格 服务实现类
 * </p>
 *
 * @author XuGaoran
 * @since 2024-01-04
 */
@Service
public class CountryServiceImpl extends ServiceImpl<CountryMapper, Country> implements ICountryService {

    @Autowired
    private CountryMapper countryMapper;

    @Override
    public Boolean hasCountry(String country) {
        return countryMapper.exists(new QueryWrapper<Country>().eq("coun_name", country));
    }

}
